/**
 * Created by jiangyun on 15/12/11.
 */
moduleUtils.filter('faceUrl', function ($$CambioConfig) {
    return function (picture) {
        if (!StringUtils.isNlOrUndOrEmpty(picture)) {
            if (picture.match("^http://")) {
                return picture;
            } else {
                var uRLParam = new URLParam();
                uRLParam.setVersion("1.1.1", "1");
                uRLParam.setAppType($$CambioConfig.appType);
                uRLParam.setClient($$CambioConfig.client);
                if(picture.length == 36){
                    return uRLParam.getUrl($$CambioConfig.DOWNLOAD_URL.format({id: picture}));
                }else{
                    return uRLParam.getUrl($$CambioConfig.DOWNLOAD_URL.format({id: picture}));
                    // return uRLParam.getUrl($$CambioConfig.DOWNLOAD_URL.format({id: picture}));
                }
            }
        } else {
            return "skin/default/img/default-face.png";
        }

    };
});